Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy the phpmd and phplint configs into the project directory #195

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

becw
Copy link
Member

@becw becw commented Oct 24, 2022

Copy the phpmd and phplint configs into the project directory, the same way as the phpcs config.

The goal here is to make it more obvious that phpmd and phplint are part of the code-review process of any particular project, and make it easier for project teams to customize those checks.

Todo

Should each of the checks be broken out into its own phing target? (which would also be run by the code-review target?) Unlike phpcs, phpmd and phplint can't get all of their parameters from their config files.

# Picks up on phpcs.xml:
$> phpcs
$> phpcbf

# Phing provides <phplint> task that accepts a <fileset> argument, which makes it much
# easier to run php linting on a large set of files. On the command line, you can use
# PHP's built in linter against one file at a time:
# @see https://www.phing.info/guide/hlhtml/#PhpLintTask
$> php -l FILENAME

# PHPmd requires the directories, output format, ruleset file, and file suffixes be passed
# as arguments:
$> phpmd docroot/modules/custom,docroot/themes/custom text phpmd.xml --suffixes=php,inc,module,theme,profile,install,test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants